#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=100005;
ll n,i,j,m,k,ans,a[N],b[N],c[N];
int main()
{
    std::ios::sync_with_stdio(false);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    ans=n;
    for(ll i=1;i<=n;i++)cin>>a[i],c[a[i]]++,b[a[i]]++;
    sort(a+1,a+n+1);
    for(ll i=n;i>=1;i--)
    {
        if(b[a[i]]>0)
        {
            b[a[i]]--;
            for(j=i-c[a[i]];j>=1;j-=c[a[j]])
            {
                if(b[a[j]]>0)
                {
                    ans--;b[a[j]]--;
                }
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}
